package com.nuoniu.sibanyun.utils;import com.nuoniu.sibanyun.entity.SysUser;import com.nuoniu.sibanyun.service.ISysUserService;import lombok.Data;import lombok.experimental.Accessors;import org.springframework.beans.factory.annotation.Autowired;import org.springframework.context.annotation.Configuration;import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder;import org.springframework.stereotype.Component;import javax.annotation.PostConstruct;/** * @author: zy * @Date: 8/11/2024 上午11:21 */@Data@Accessors(chain = true)@Componentpublic class ResourceHolder {    @Autowired    ISysUserService userMapper;    @Autowired    BCryptPasswordEncoder bCryptPasswordEncoder;    //重置密码，用于初始化账号的密码//    @PostConstruct//    public void resetPassword(){//        SysUser user = userMapper.findByUserName("system");//        user.setPassword(bCryptPasswordEncoder.encode("123456"));//        userMapper.updateById(user);//    }}